package xx.ring.dept.controller;

import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

public class LoginController {

    @GetMapping("/login")
    String login() {
        return "login";
    }

    @RequestMapping(value = "/doLogin",method = RequestMethod.POST)
    @ResponseBody
    Object doLogin(HttpServletRequest request,
                   String account,String password) {
        if ("1".equals(account) && "1".equals(password)) {
            return "成功";
        }else{
            return "失败";
        }
    }
}
